<style>
    .infobox {
        float: left;
        width: 354px;
        height: 232px;
        margin-left: 12px;
        text-align: center;
        vertical-align: middle;
        margin-top: 45px;
    }

    .infobox img {
        margin-top: 45%;
        margin-left: 25%
    }

    .box1 {
        background-image: url(<?php echo base_url();?>/public/assets/image/myzijin.png);
        margin-left: 30px;
    }

    .boxl {
        height: 100%;
        width: 50%;
        float: left
    }

    .boxr {
        height: 100%;
        width: 50%;
        float: left
    }

    .boxr div {
        font-size: 21px;
        width: 100%;
        margin-top: 45%;
        margin-left: -25%;
        color: white;
    }

    .boxr .p1 {
        font-size: 19px;
    }

    .box2 {
        background-image: url(<?php echo base_url();?>/public/assets/image/box2.png)
    }

    .box3 {
        background-image: url(<?php echo base_url();?>/public/assets/image/box3.png)
    }

    .box4 {
        background-image: url(<?php echo base_url();?>/public/assets/image/box4.png)
    }

    .body_body_mid {
        background-color: #f5f6fa
    }

    .body1 {
        height: 310px;
        background-color: white;
        float: top;
        width: 100%;
    }

    .body2 {
        height: 420px;
        background-color: white;
        float: top;
        width: 100%;
        margin-top: 30px;
    }


    .linkbox {
        margin-left: 50px;
        height: 200px;
        width: 100%;
        padding-top: 30px;
    }

    .lie {
        width: 100%;
        height: 25px;
        margin-top: 20px;
    }

    .lie .zuo {
        font-size: 15px;
        font-weight: bold;
        width: 6%;
        float: left
    }

    .lie .you {
        font-size: 15px;
        width: 20%;
        float: left
    }

    #fuzhi {
        height: 42px;
        margin-top: 3px;
    }

    #test10 img {
        width: 100%;
        height: 250px
    }
</style>
<script src="<?php echo base_url() . 'public/'; ?>assets/js/clipboard.min.js"></script>

<link rel="stylesheet" href="<?php echo base_url() . 'public'; ?>/layui/css/font.css">
<link rel="stylesheet" href="<?php echo base_url() . 'public'; ?>/layui/css/xadmin.css">
<!-- <link rel="stylesheet" href="<?php echo base_url() . 'public'; ?>/layui/css/theme5.css"> -->
<script src="<?php echo base_url() . 'public'; ?>/layui/lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="<?php echo base_url() . 'public'; ?>/layui/js/xadmin.js"></script>
<script type="text/javascript" src="<?php echo base_url() . 'public'; ?>/layui/js/jquery.min.js"></script>


<div style="width: 100%;height: 250px">

    <div class="layui-carousel" id="test10">
        <div carousel-item="">
            <?php

            foreach ($banner as $id => $v) {
                ?>
                <div><a href="<?php echo $v['link']; ?>" target="_blank"><img src=" <?php echo $v['url'] ?>"></a></div>
                <?php
            }
            ?>


        </div>
    </div>
    <div>
        <div class="body1">


            <div class="infobox box1">
                <div class="boxl">
                    <img src="<?php echo base_url(); ?>/public/assets/image/myzijin1.png">
                </div>
                <div class="boxr">
                    <div>
                        <p class="p1">拥有资金</p>
                        <p class="money">0</p>
                    </div>
                </div>
            </div>
            <div class="infobox box2">
                <div class="boxl">
                    <img src="<?php echo base_url(); ?>/public/assets/image/box2_1.png">
                </div>
                <div class="boxr">
                    <div>
                        <p class="p1">累计任务</p>
                        <p class="task_nub">0</p>
                    </div>
                </div>
            </div>
            <div class="infobox box3">
                <div class="boxl">
                    <img src="<?php echo base_url(); ?>/public/assets/image/box3_1.png">
                </div>
                <div class="boxr">
                    <div>
                        <p class="p1">推广奖励</p>
                        <p class="extension">0</p>
                    </div>
                </div>

            </div>
            <div class="infobox box4">
                <div class="boxl">
                    <img src="<?php echo base_url(); ?>/public/assets/image/box4_1.png">
                </div>
                <div class="boxr">
                    <div>
                        <p class="p1">邀请人数</p>
                        <p class="extension_nub">0</p>
                    </div>
                </div>
            </div>
        </div>

        <div class="body2">

            <div class="linkbox">
                <div class="lie">
                    <div class="zuo">邀请好友：</div>
                    <div class="you red"> 每成功邀请一个好友赠送10金币</div>
                </div>
                <div class="lie">
                    <div class="zuo"> 推广链接 ：</div>
                    <div class="you">
                        <input type="text" class="am-input-sm" id="linkid" name="account" id="doc-ipt-email-1"
                               value="<?php echo $link; ?>">
                        <div id="fuzhi" class="am-btn am-btn-secondary am-radius copy" data-clipboard-action="copy"
                             data-clipboard-target="#linkid">复制
                        </div>
                        <div class="msgbox"
                             style="width: 200px;  font-size: 22px; margin-left: 700px;  margin-top: -85px;">
                            昨日留评率: <?php echo $msg; ?></div>
                    </div>
                </div>
            </div>
        </div>


    </div>
</div>
</div>
<div class="foods">
    <ul>
        版权所有@2019.
    </ul>
    <dl>
        <a href="" title="返回头部" class="am-icon-btn am-icon-arrow-up"></a>
    </dl>
</div>

<div class="box" style="display: none">


    <table class="am-table  am-table-radius am-table-striped am-table-hover" style="">
        <thead>
        <tr class="am-success">
            <th class="table-type">普通单客单价</th>
            <th class="table-type">所需金币数</th>
            <th class="table-type">高留评单客单价</th>
            <th class="table-type">所需金币数</th>
            <th class="table-type">DSR客单价</th>
            <th class="table-type">所需金币数</th>
            <th class="table-type">拼多多直播间客单价</th>
            <th class="table-type">所需金币数</th>

        </tr>
        </thead>
        <tbody class="impowdith">
        <?php
        foreach ($list as $id => $v) { ?>
            <tr>
                <td><?php echo $v[0]; ?></td>
                <td><?php echo $v[1]; ?></td>
                <td><?php echo $v[2]; ?></td>
                <td><?php echo $v[3]; ?></td>
                <td><?php echo $v[4]; ?></td>
                <td><?php echo $v[5]; ?></td>
                <td><?php echo $v[6]; ?></td>
                <td><?php echo $v[7]; ?></td>
            </tr>
        <?php } ?>


    </table>
    <div style="text-align: center; font-size: 15px;display: none">
        金币是佣金 资金是本金 要区分清楚 金币兑换足够发布任务即可，每单额收取<span class="red">1</span>金币服务费
    </div>
</div>


<div class="gonggao" style="width: 800px;height: 550px;display: none">
    <img style="width: 100%;height: 100%" src="<?php echo base_url(); ?>/public/assets/image/index.jpg">
</div>
<div class="gonggao2" style="width: 800px;height: 550px;display: none">
    <div style="text-align: center;color: red;font-size: 22px;line-height: 80px">由于拼多多更新DSR业务暂时取消，正在内测阶段，稍后业务重新上线</div>
</div>
<div class="gonggao3" style="width: 800px;height: 550px;display: none">
    <img style="width: 100%;height: 100%" src="<?php echo base_url(); ?>/public/assets/image/index2.jpg">
</div>

</body>
</html>


<script>

    var webid = "<?php echo $this->session->webinfo['id'];  ?>";
    var list='<?php echo json_encode($list); ?>'
    localStorage['commissionlist']=list;
    layer.open({
        type: 1,
        title: '平台公告',
        skin: 'layui-layer-rim', //加上边框
        area: ['500px', '68%'], //宽高
        content: $(".gonggao3").html(),
        cancel: function (index2, layero2) {
            layer.open({
                type: 1,
                title: '平台公告',
                skin: 'layui-layer-rim', //加上边框
                area: ['500px', '68%'], //宽高
                content: $(".gonggao").html(),
                cancel: function (index2, layero2) {

                }
            });
        }
    });



    var clipboard = new ClipboardJS('.copy');
    clipboard.on('success', function () {
        layer.msg("复制成功");
        //parent.layer.alert("内容已复制到剪贴板！");
    });
    clipboard.on('error', function () {
        layer.msg("复制失败");
        //  parent.layer.alert("XXX！");
    });


    var on_request = false;
    var type = 1;
    var page = 1;

    function setlisthtnml(data) {
        var html = '';
        if (data.list.length > 0) {
            $.each(data.list, function (key, value) {
                $(".money").text("￥" + value.money);
                $(".task_nub").text(value.task_nub);
                $(".extension").text("￥" + value.extension);
                $(".extension_nub").text(value.extension_nub);
            });
        } else {
            html += '<div style="width:100%;text-align:center;">暂无数据</div>';
            $(".impowdith").html(html);

        }

    }

    getpaylist();

    function getpaylist() {
        var url = "<?php echo site_url(); ?>/Business/getindexdata";
        var postdata = {
            'page': page
        };
        $.post(url, postdata, function (data) {
            on_request = false;
            setlisthtnml(data);

        }, 'json');

    }


</script>

<script>
    layui.use(['carousel', 'form'], function () {
        var carousel = layui.carousel
            , form = layui.form;
        //图片轮播
        carousel.render({
            elem: '#test10'
            , width: '100%'
            , height: '250px'
            , interval: 3000
        });
    });

</script>





